package com.ctyun.xstore.vod.category;

import java.io.IOException;
import com.ctyun.xstore.vod.category.request.AddVideoCategoryRequest;
import com.ctyun.xstore.vod.category.request.DeleteVideoCategoryRequest;
import com.ctyun.xstore.vod.category.request.ListVideoCategoryRequest;
import com.ctyun.xstore.vod.category.request.ModifyVideoCategoryRequest;
import com.ctyun.xstore.vod.category.response.AddVideoCategoryResponse;
import com.ctyun.xstore.vod.category.response.DeleteVideoCategoryReponse;
import com.ctyun.xstore.vod.category.response.ListVideoCategoryResponse;
import com.ctyun.xstore.vod.category.response.ModifyVideoCategoryReponse;
import com.ctyun.xstore.vod.common.AbstractGeneralClient;

public class VideoCategoryClient extends AbstractGeneralClient {

	public VideoCategoryClient(String accessKey, String secretKey) {
		super(accessKey, secretKey);
	}

	public VideoCategoryClient(String host, String accessKey, String secretKey) {
		super(host, accessKey, secretKey);
	}

	/**
	 * to add a video category
	 * 
	 * @param request
	 * @return
	 * @throws IOException
	 */
	public AddVideoCategoryResponse addVideoCategory(AddVideoCategoryRequest request) throws IOException {
		return this.execute(request, AddVideoCategoryResponse.class);
	}

	/**
	 * list user's video category
	 * 
	 * @param request
	 * @return
	 * @throws IOException
	 */
	public ListVideoCategoryResponse listVideoCategory(ListVideoCategoryRequest request) throws IOException {
		return this.execute(request, ListVideoCategoryResponse.class);
	}

	/**
	 * modify a video category
	 * 
	 * @param request
	 * @return
	 * @throws IOException
	 */
	public ModifyVideoCategoryReponse modifyVideoCategory(ModifyVideoCategoryRequest request) throws IOException {
		return this.execute(request, ModifyVideoCategoryReponse.class);
	}

	/**
	 * delete a video category
	 * 
	 * @param request
	 * @return
	 * @throws IOException
	 */
	public DeleteVideoCategoryReponse deleteVideoCategory(DeleteVideoCategoryRequest request) throws IOException {
		return this.execute(request, DeleteVideoCategoryReponse.class);
	}
}
